<template>
	<view class="content">
		<view class="logistics-box flexWrapNo">
			<image src="../../static/shop/logistics-icon.png" class="logistics-icon"></image>
			<view class="logistics-info">
				<view class="info-top flexWrap">
					<view>中通快递（SD23984928394）</view>
					<view class="status">配送中</view>
				</view>
				<view class="info-cont">
					<view class="info-item">
						卖家已发货 2023-11-21 11:31:11
					</view>
					<view class="info-item">
						到达成都中转站  2023-11-22 11:31:11
					</view>
					<view class="info-item">
						到达点点花园中驿站  2023-11-22 11:31:11
					</view>
				</view>
			</view>
		</view>
		<view class="address-box flexWrap">
			<view class="address-left flexWrapNo">
				<image src="../../static/shop/address-icon.png" class="address-icon"></image>
				<view class="address-info">
					<view class="address-name">貘鱼台球 理想中心</view>
					<view class="address-details">{{goodInfo.address}}</view>
				</view>
			</view>
		</view>
		<view class="shop-box">
			<view class="top-box flexWrap">
				<view class="date">2017-06-24</view>
				<view class="status">已发货</view>
			</view>
			<view class="shop-cont flexWrapNo">
				<image :src="goodInfo.image" class="shop-img"></image>
				<view class="shop-info-box flexWarpColumn">
					<view class="info-box">
						<view>{{goodInfo.title}}</view>
						<view class="specs-box">当日到店 , x{{goodInfo.nums}}</view>
					</view>
					<view class="price">¥{{goodInfo.price}}</view>
				</view>
			</view>
			<view class="total-box">
				共{{goodInfo.nums}}件 总额 <text class="price">¥{{goodInfo.realprice}}</text>
			</view>
		</view>
		<view class="order-box">
			<view class="order-info">
				订单编号:{{orderInfo.order_sn}}
			</view>
			<view class="order-info">
				支付方式:微信支付
			</view>
			<view class="order-info">
				物流公司:商家自行配送
			</view>
			<view class="order-info">
				快递单号: 462957590235629
			</view>
			<view class="order-info">
				下单时间:2023-06-06 09:30:24
			</view>
			<view class="order-info">
				发货时间:2023-06-06 10:10:07
			</view>
			<view class="order-info">
				成交时间:2023-06-16 10:10:07
			</view>
		</view>
		<view class="bottom-box flexWrap">
			<view class="btn">取消订单</view>
			<view class="define-btn">立即支付</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderId:"",
				orderInfo:{},
				goodInfo:{}
			};
		},
		onLoad(ops) {
			this.orderId=ops.orderId
			this.getOrderInfo()
		},
		methods:{
			getOrderInfo(){
				this.$request.post(this.$api.shopOrderDetails, {
					orderid:this.orderId
				}, {
					token:true
				}).then(res => {
					if (res.code == 1) {
						let {
							data = {}
						} = res;
						this.orderInfo=data
						this.goodInfo=data.order_goods
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.content{
		padding: 44upx 36upx;
		padding-bottom: 200upx;
	}
	.logistics-box{
		background: #1D1C5C;
		border-radius: 16rpx;
		padding: 32upx 28upx;
		align-items: flex-start;
		.logistics-icon{
			width: 36upx;
			height: 32upx;
			margin-right: 24upx;
			flex: none;
		}
		.logistics-info{
			.info-top{
				font-size: 32rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				color: #FFFFFF;
				.status{
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					color: #FF4646;
				}
			}
			.info-cont{
				margin-top: 12upx;
				.info-item{
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					color:#8E8EAE;
					line-height: 40upx;
				}
			}
		}
	}
	.address-box{
		background: #1D1C5C;
		border-radius: 16rpx;
		padding: 32upx 28upx;
		margin-top: 20upx;
		.address-left{
			align-items: start;
			.address-icon{
				width: 34upx;
				height: 40upx;
				flex: none;
			}
			.address-info{
				margin-left: 26upx;
				.address-name{
					font-size: 32rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					color: #FFFFFF;
				}
				.address-details{
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					color:#8584A0;
					margin: 12upx 0;
				}
				.user-info{
					font-size: 24rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 400;
					color:#8584A0;
				}
			}
		}
		.icon-more{
			border-color: #FFFFFF;
		}
	}
	.shop-box{
		height: 480rpx;
		background: #1D1C5C;
		border-radius: 16rpx;
		margin-top: 36upx;
		.top-box{
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
			padding: 32upx 28upx;
		}
		.shop-cont{
			padding: 32upx 28upx;
			border-top: 1rpx solid #36355E;
			border-bottom: 1rpx solid #36355E;
			.shop-img{
				width: 224rpx;
				height: 224rpx;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
			}
			.shop-info-box{
				margin-left: 28upx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				color:#FFFFFF;
				height: 224rpx;
				justify-content: space-between;
				.info-box{
					.specs-box{
						color: #8786A8;
						margin-top: 12upx;
					}
				}
			}
		}
		.total-box{
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			color:#8786A8;
			line-height: 100upx;
			text-align: right;
			padding: 0 28upx;
			.price{
				color: #FFFFFF;
				margin-left: 24upx;
			}
		}
	}
	.order-box{
		margin-top: 20upx;
		padding: 32upx 0;
		.order-info{
			font-size: 28rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			color:#82819B;
			margin-bottom: 20upx;
		}
	}
	.bottom-box{
		height: 120rpx;
		background: #1D1C5C;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		margin: auto;
		font-size: 32rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		padding: 0 66upx;
		.btn{
			font-size: 32rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			width: 282rpx;
			height: 80rpx;
			line-height: 80rpx;
			border-radius: 16rpx;
			border: 2rpx solid #26BCFD;
			text-align: center;
		}
		.define-btn{
			font-size: 32rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			line-height: 80rpx;
			width: 282rpx;
			height: 80rpx;
			background: #26BCFD;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			text-align: center;
		}
	}
</style>
